#!/usr/bin/env bash

# theme
BG_COMMAND="feh --bg-tile $HOME/.wm/walls/tiled/seigaiha.png"
emacs_theme="base16-grayscale-light"
emacs_powerline_scale="1.4"

# bspwm
b_border_width=1
b_window_gap=40

b_bspwmrc_extend="
xpad
"

st_borderpx=10

b_normal_border_color=$(colort -20 -t $p_bg_normal)
b_active_border_color=$(colort -50 -t $p_bg_normal)
b_focused_border_color=$(colort -80 -t $p_bg_normal)

b_normal_border_color=$(colort -20 -t $p_bg_normal)
b_active_border_color=cecece
b_focused_border_color=7c7c7c

p_bg_normal="#ffe3e3e3"
p_fg_active="#ff525252"
p_bg_active="#ffb9b9b9"

p_format_2="desktop:github:themeSwitch:title|org_task|dynamicmpd:volume:clock"
p_title_show_mode=active         # used by title.

p_height=25
p_gap=0
p_line=3
p_window_class="noshadow"
p_line=2
p_padding=6

p_font_main="Go Mono for Powerline-12:style=Bold"
p_font_icon="FontAwesome-12" # Panel Icon font.
p_icon_enable=false
d_font="Go Mono for Powerline 10"

p_desktop_occupied_label="$(echo -n -e '\uf111')"
p_desktop_empty_label="$(echo -n -e '\uf1db')"

p_desktop_tiling_label=''
p_desktop_monocle_label="$(echo -n -e '\uf00b')"

st_font="Go Mono for Powerline-12:style=Regular"
p_title_only_show_active=true
maxWinNameLen=30

p_title_theme="fg=\"#ff$(colort -t 30 525252)\""
p_desktop_theme="fg=\"#ff$(colort -t 30 525252)\""

c_shadow="false"
c_frame_opacity="1.0"
c_shadow_opacity="0.5"
c_shadow_radius="5"
c_shadow_offset_x="-8"
c_shadow_offset_y="-8"

c_fading="false";
c_fade_in_step="0.1"
c_fade_out_step="0.1"


activeline() {
    activefg
}

line() {
    bg
}

even_section() {
    iif "[ $((step%2)) -eq 0 ]"
}

stepSetup() {
    separateStep
}

fg() {
    iif $(even_section) "525252" "a4a4a4"
}


activebg() {
    bg
}
 
bg() {
    iif $(even_section) "b9b9b9" "f7f7f7"
}

suffix() {
  border="%%{B#FFcecece}%%{O2}%%{B-}"
  iif $(even_section) "$border" ""
}

prefix() {
  border="%%{B#FFcecece}%%{O2}%%{B-}"
  iif $(even_section) "$border" ""
}
